{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "### Import packages\n",
    "# Processing\n",
    "import glob\n",
    "import os\n",
    "import SimpleITK as sitk\n",
    "import numpy as np\n",
    "import tables\n",
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "from nilearn import plotting\n",
    "import pandas as pd\n",
    "# Model\n",
    "import skimage.io as io\n",
    "import skimage.transform as trans\n",
    "from keras.models import *\n",
    "from keras.layers import *\n",
    "from keras.optimizers import *\n",
    "from keras.callbacks import ModelCheckpoint, LearningRateScheduler\n",
    "from keras import backend as keras\n",
    "from keras.models import Sequential\n",
    "from keras.layers import Dense\n",
    "# HDF5\n",
    "from keras.utils.io_utils import HDF5Matrix\n",
    "import h5py\n",
    "# Generator\n",
    "from random import shuffle\n",
    "import pickle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Input shape (32, 32, 32, 4)\n"
     ]
    }
   ],
   "source": [
    "## Dictionary\n",
    "config = dict()\n",
    "config[\"image_shape\"] = (32,32,32)#(144, 144, 144) \n",
    "config[\"labels\"] = (1, 2, 4)  # the label numbers on the input image\n",
    "config[\"n_labels\"] = len(config[\"labels\"])\n",
    "config[\"all_modalities\"] = [\"t1\", \"t1ce\", \"flair\", \"t2\"]\n",
    "config[\"training_modalities\"] = config[\"all_modalities\"]  \n",
    "config[\"nb_channels\"] = len(config[\"training_modalities\"])\n",
    "config[\"input_shape\"] = tuple(list(config[\"image_shape\"])+[config[\"nb_channels\"]])\n",
    "print('Input shape',config['input_shape'])\n",
    "#config['data_file']=os.path.join('/home/vjain/notebooks/3DUnetCNN/brats','brats_data.h5')\n",
    "config[\"data_file\"] = os.path.abspath('brats_data.h5')\n",
    "data_file=config['data_file']\n",
    "#config[\"training_file\"] = os.path.join('/home/vjain/notebooks/3DUnetCNN/brats',\"training_ids.pkl\")\n",
    "config[\"training_file\"] = os.path.abspath('training_ids.pkl')\n",
    "#config[\"validation_file\"] = os.path.join('/home/vjain/notebooks/3DUnetCNN/brats',\"validation_ids.pkl\")\n",
    "config[\"validation_file\"] = os.path.abspath('validation_ids.pkl')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Declare relations\n",
    "validation_keys_file=config[\"validation_file\"],\n",
    "training_keys_file=config[\"training_file\"],\n",
    "n_labels=config[\"n_labels\"],\n",
    "n_labels,=n_labels\n",
    "labels=config[\"labels\"],\n",
    "training_file=training_keys_file\n",
    "validation_file=validation_keys_file"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define Data generator: Training and Validation -- Batch_size 1\n",
    "\n",
    "def data_gen(data_file, ids_file, labels, batch_size=1): \n",
    "    \n",
    "     with (open(ids_file, \"rb\")) as keys_file, open(data_file,'rb') as data_file:\n",
    "        \n",
    "        # Load indices: Train/Val\n",
    "        index_file=pickle.load(keys_file)\n",
    "        orig_index_list = index_file\n",
    "        # Define Data and Target lists\n",
    "        x_list = list()\n",
    "        y_list = list()\n",
    "        index_file= list(copy.copy(orig_index_list))\n",
    "        print('index_list',index_file)\n",
    "        shuffle_index_list=True\n",
    "        if shuffle_index_list:\n",
    "            shuffle(index_file)\n",
    "        while len(index_file) > 0:\n",
    "                index = index_file.pop()\n",
    "                print('index',index)\n",
    "                # Extract training data corresponding to indices\n",
    "                for idx in index_file:\n",
    "                    X_data = HDF5Matrix(data_file, 'data',0,None)\n",
    "                    X_data=X_data[idx]\n",
    "                    print('X_data.shape',X_data.shape)\n",
    "                    X_data=np.reshape(X_data,(X_data.shape[1],X_data.shape[2],X_data.shape[3],X_data.shape[0]))\n",
    "                    Y_mask = HDF5Matrix(data_file, 'truth',0,None)\n",
    "                    Y_mask=Y_mask[idx]\n",
    "                    Y_mask=np.reshape(Y_mask,(Y_mask.shape[1],Y_mask.shape[2],Y_mask.shape[3],Y_mask.shape[0]))\n",
    "                    print('Reshaped data',X_data.shape)\n",
    "                    print('Reshaped mask',Y_mask.shape)\n",
    "                    x_list.append(X_data)\n",
    "                    y_list.append(Y_mask)\n",
    "                    # Convert HDF5 data to numpy arrays\n",
    "                    x = np.asarray(x_list)\n",
    "                    y = np.asarray(y_list)\n",
    "                    print('x',x.shape)\n",
    "                    print('y', y.shape)\n",
    "                    if len(x) == batch_size or len(x) > 0:\n",
    "                        # Translate labels to binary\n",
    "                        n_labels=3\n",
    "                        labels=config[\"labels\"]\n",
    "                        new_shape = [y.shape[0],n_labels] + list(y.shape[1:4])\n",
    "                    \n",
    "                        y_new= np.zeros(new_shape, np.int8)\n",
    "                        print('y_new',y_new.shape)\n",
    "                        for label_index in range(n_labels):\n",
    "                            if labels is not None:\n",
    "                                y_new[:, label_index][y_new[:, 0] == labels[label_index]] = 1\n",
    "                            else:\n",
    "                                y_new[:, label_index][y_new[:, 0] == (label_index + 1)] = 1\n",
    "                        print('y_new shape in multiclass',y_new.shape)\n",
    "                    \n",
    "                    #y_reshape=np.reshape(y_new,(y_new.shape[3],y_new.shape[2],y_new.shape[1],y_new.shape[0],y.shape[0]))\n",
    "                    #y_reshape=np.reshape(y_new,(y_new.shape[3],y_new.shape[2],y_new.shape[1],y_new.shape[0],n_labels))\n",
    "                    #y_reshape=np.reshape(y_new,(y.shape[0],y_new.shape[3],y_new.shape[2],y_new.shape[1],y_new.shape[0]))#y.shape[0]))\n",
    "                    \n",
    "                        y_reshape=np.reshape(y_new,(-1,y_new.shape[2],y_new.shape[3],y_new.shape[4],y_new.shape[1]))#y.shape[0]))\n",
    "                        print('reshaped y',y_reshape.shape)\n",
    "                    \n",
    "                    #x_reshape=np.reshape(x,(-1,x.shape[3],x.shape[2],x.shape[1],x.shape[4]))\n",
    "                    #print('reshaped_x',x_reshape.shape)\n",
    "                    \n",
    "                    \n",
    "                        yield x,y_reshape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define 3DUnet model\n",
    "import numpy as np\n",
    "import os\n",
    "import skimage.io as io\n",
    "import skimage.transform as trans\n",
    "import numpy as np\n",
    "from keras.models import *\n",
    "from keras.layers import *\n",
    "from keras.optimizers import *\n",
    "from keras.callbacks import ModelCheckpoint, LearningRateScheduler\n",
    "from keras import backend as keras\n",
    "\n",
    "def unet_model_3d(input_shape):\n",
    "    print('input_shape',input_shape)\n",
    "    inputs = Input(input_shape)\n",
    "    print('input',inputs.shape)\n",
    "    #1\n",
    "    conv1 = Conv3D(32, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(inputs)\n",
    "    print('conv1',conv1.shape)\n",
    "    #2\n",
    "    conv1 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv1)\n",
    "    print('conv_1',conv1.shape)\n",
    "    pool1 = MaxPooling3D(pool_size=(2, 2, 2),dim_ordering='tf')(conv1)\n",
    "    print('pool1',pool1.shape)\n",
    "    #3\n",
    "    conv2 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(pool1)\n",
    "    print('conv2',conv2.shape)\n",
    "    #4\n",
    "    conv2 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv2)\n",
    "    print('conv_2',conv2.shape)\n",
    "    pool2 = MaxPooling3D(pool_size=(2, 2, 2),dim_ordering='tf')(conv2)\n",
    "    print('pool2',pool2.shape)\n",
    "    #5\n",
    "    conv3 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(pool2)\n",
    "    print('conv3',conv3.shape)\n",
    "    #6\n",
    "    conv3 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv3)\n",
    "    print('conv_3',conv3.shape)\n",
    "    pool3 = MaxPooling3D(pool_size=(2, 2, 2),dim_ordering='tf')(conv3)\n",
    "    print('pool3',pool3.shape)\n",
    "    #7\n",
    "    conv4 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(pool3)\n",
    "    print('conv4',conv4.shape)\n",
    "    #8\n",
    "    conv4 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv4)\n",
    "    print('conv_4',conv4.shape)\n",
    "    drop4 = Dropout(0.5)(conv4)\n",
    "    print('drop4',drop4.shape)\n",
    "    #9\n",
    "    up5 = Conv3D(256, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(UpSampling3D(size = (2,2,2),dim_ordering='tf')(drop4))\n",
    "    print('up5',up5.shape)\n",
    "    merge5 = concatenate([conv3,up5])\n",
    "    print('merge5',merge5.shape)\n",
    "    #10\n",
    "    conv5 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(merge5)\n",
    "    print('conv5',conv5.shape)\n",
    "    #11\n",
    "    conv5 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv5)\n",
    "    print('conv_5',conv5.shape)\n",
    "    drop5=Dropout(0.5)(conv5)\n",
    "    print('drop5',drop5.shape)\n",
    "    #12\n",
    "    up6 = Conv3D(256, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(UpSampling3D(size = (2,2,2),dim_ordering='tf')(drop5))\n",
    "    print('up6',up6.shape)\n",
    "    merge6 = concatenate([conv2,up6])\n",
    "    print('merge6',merge6.shape)\n",
    "    #13\n",
    "    conv6 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(merge6)\n",
    "    print('conv6',conv6.shape)\n",
    "    #14\n",
    "    conv6 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv6)\n",
    "    print('conv_6',conv6.shape)\n",
    "    #15\n",
    "    up7 = Conv3D(128, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(UpSampling3D(size = (2,2,2),dim_ordering='tf')(conv6))\n",
    "    print('up7',up7.shape)\n",
    "    merge7 = concatenate([conv1,up7])\n",
    "    print('merge7',merge7.shape)\n",
    "    #16\n",
    "    conv7 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(merge7)\n",
    "    print('conv7',conv7.shape)\n",
    "    #17\n",
    "    conv7 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv7)\n",
    "    print('conv_7',conv7.shape)\n",
    "    #18\n",
    "    conv8 = Conv3D(4, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv7)\n",
    "    print('conv8',conv8.shape)\n",
    "    #19\n",
    "    conv9 = Conv3D(3, 1, activation = 'sigmoid',dim_ordering='tf')(conv8)\n",
    "    print('conv9',conv9.shape)\n",
    "    model = Model(input = inputs, output = conv9)\n",
    "\n",
    "    model.compile(optimizer = Adam(lr = 1e-4), loss = 'binary_crossentropy', metrics = ['accuracy'])\n",
    "    #config[\"model_file\"] = model.save('/home/vjain/notebooks/3DUnetCNN/brats/tumor_model.h5')\n",
    "    config[\"model_file\"] = model.save( os.path.abspath('model/tumor_model.h5'))\n",
    "    return model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "input_shape (32, 32, 32, 4)\n",
      "input (?, 32, 32, 32, 4)\n",
      "conv1 (?, 32, 32, 32, 32)\n",
      "conv_1 (?, 32, 32, 32, 64)\n",
      "pool1 (?, 16, 16, 16, 64)\n",
      "conv2 (?, 16, 16, 16, 64)\n",
      "conv_2 (?, 16, 16, 16, 128)\n",
      "pool2 (?, 8, 8, 8, 128)\n",
      "conv3 (?, 8, 8, 8, 128)\n",
      "conv_3 (?, 8, 8, 8, 256)\n",
      "pool3 (?, 4, 4, 4, 256)\n",
      "conv4 (?, 4, 4, 4, 256)\n",
      "conv_4 (?, 4, 4, 4, 256)\n",
      "drop4 (?, 4, 4, 4, 256)\n",
      "up5 (?, 8, 8, 8, 256)\n",
      "merge5 (?, 8, 8, 8, 512)\n",
      "conv5 (?, 8, 8, 8, 256)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:18: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(32, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:21: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(64, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:23: UserWarning:\n",
      "\n",
      "Update your `MaxPooling3D` call to the Keras 2 API: `MaxPooling3D(pool_size=(2, 2, 2), data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:29: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(128, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:37: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(256, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:50: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(256, 2, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:50: UserWarning:\n",
      "\n",
      "Update your `UpSampling3D` call to the Keras 2 API: `UpSampling3D(size=(2, 2, 2), data_format=\"channels_last\")`\n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "conv_5 (?, 8, 8, 8, 256)\n",
      "drop5 (?, 8, 8, 8, 256)\n",
      "up6 (?, 16, 16, 16, 256)\n",
      "merge6 (?, 16, 16, 16, 384)\n",
      "conv6 (?, 16, 16, 16, 128)\n",
      "conv_6 (?, 16, 16, 16, 128)\n",
      "up7 (?, 32, 32, 32, 128)\n",
      "merge7 (?, 32, 32, 32, 192)\n",
      "conv7 (?, 32, 32, 32, 64)\n",
      "conv_7 (?, 32, 32, 32, 64)\n",
      "conv8 (?, 32, 32, 32, 4)\n",
      "conv9 (?, 32, 32, 32, 3)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:74: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(128, 2, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:85: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(4, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:88: UserWarning:\n",
      "\n",
      "Update your `Conv3D` call to the Keras 2 API: `Conv3D(3, 1, activation=\"sigmoid\", data_format=\"channels_last\")`\n",
      "\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:90: UserWarning:\n",
      "\n",
      "Update your `Model` call to the Keras 2 API: `Model(inputs=Tensor(\"in..., outputs=Tensor(\"co...)`\n",
      "\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/2\n",
      "index_list [6, 62, 21, 8, 24, 15, 40, 43, 28, 20, 48, 34, 25, 12, 9, 45, 27, 1, 32, 57, 33, 42, 7, 5, 58, 30, 35, 38, 47, 11, 31, 16, 53, 60, 2, 59, 63, 52, 49, 61, 54, 37, 13, 51, 10, 19, 64, 36, 4, 55, 22, 17]\n",
      "index 61\n",
      "index_list [3, 46, 14, 18, 0, 50, 26, 41, 39, 44, 56, 23, 29]\n",
      "index 56\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (1, 32, 32, 32, 4)\n",
      "y (1, 32, 32, 32, 1)\n",
      "y_new Reshaped data(1, 3, 32, 32, 32)\n",
      " (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (1, 32, 32, 32, 4)\n",
      "y (1, 32, 32, 32, 1)\n",
      "y_new (1, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (1, 3, 32, 32, 32)\n",
      "reshaped y (1, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (1, 3, 32, 32, 32)\n",
      "reshaped y (1, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shapeReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (2, 32, 32, 32, 4)\n",
      "y (2, 32, 32, 32, 1)\n",
      "xy_new (2, 3, 32, 32, 32)\n",
      " (2, 32, 32, 32, 4)\n",
      "y (2, 32, 32, 32, 1)\n",
      "y_new (2, 3, 32, 32, 32)\n",
      "y_new shape in multiclass y_new shape in multiclass (2, 3, 32, 32, 32)\n",
      "reshaped y (2, 32, 32, 32, 3)\n",
      "(2, 3, 32, 32, 32)\n",
      "reshaped y (2, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "X_data.shape x (3, 32, 32, 32, 4)(4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "\n",
      "y (3, 32, 32, 32, 1)\n",
      "y_new (3, 3, 32, 32, 32)Reshaped mask (32, 32, 32, 1)\n",
      "\n",
      "x (3, 32, 32, 32, 4)\n",
      "y (3, 32, 32, 32, 1)\n",
      "y_new (3, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (3, 3, 32, 32, 32)\n",
      "reshaped y y_new shape in multiclass (3, 3, 32, 32, 32)\n",
      "reshaped y (3, 32, 32, 32, 3)\n",
      "(3, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (4, 32, 32, 32, 4)\n",
      "y (4, 32, 32, 32, 1)\n",
      "y_new (4, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (4, 3, 32, 32, 32)\n",
      "reshaped y (4, 32, 32, 32, 3)\n",
      "x (4, 32, 32, 32, 4)\n",
      "y (4, 32, 32, 32, 1)\n",
      "y_new (4, 3, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped masky_new shape in multiclass  (32, 32, 32, 1)\n",
      "(4, 3, 32, 32, 32)\n",
      "reshaped y (4, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (5, 32, 32, 32, 4)\n",
      "y (5, 32, 32, 32, 1)\n",
      "y_new (5, 3, 32, 32, 32)\n",
      "xy_new shape in multiclass (5, 3, 32, 32, 32)\n",
      "reshaped y (5, 32, 32, 32, 3)\n",
      " (5, 32, 32, 32, 4)\n",
      "y (5, 32, 32, 32, 1)\n",
      "y_new (5, 3, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "y_new shape in multiclass (5, 3, 32, 32, 32)\n",
      "reshaped y (5, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (6, 32, 32, 32, 4)\n",
      "y (6, 32, 32, 32, 1)\n",
      "y_new (6, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (6, 3, 32, 32, 32)\n",
      "reshaped y (6, 32, 32, 32, 3)\n",
      "x (6, 32, 32, 32, 4)\n",
      "y (6, 32, 32, 32, 1)\n",
      "y_new (6, 3, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "y_new shape in multiclass (6, 3, 32, 32, 32)\n",
      "reshaped y (6, 32, 32, 32, 3)\n",
      "x (7, 32, 32, 32, 4)\n",
      "y (7, 32, 32, 32, 1)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "y_new (7, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (7, 3, 32, 32, 32)\n",
      "reshaped y (7, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (7, 32, 32, 32, 4)\n",
      "y (7, 32, 32, 32, 1)\n",
      "y_new (7, 3, 32, 32, 32)\n",
      "x (8, 32, 32, 32, 4)\n",
      "y (8, 32, 32, 32, 1)\n",
      "y_new shape in multiclass (7, 3, 32, 32, 32)\n",
      "reshaped y (7, 32, 32, 32, 3)\n",
      "y_new (8, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (8, 3, 32, 32, 32)\n",
      "reshaped y (8, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shapeReshaped data  (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "(32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (9, 32, 32, 32, 4)\n",
      "y (9, 32, 32, 32, 1)x (8, 32, 32, 32, 4)\n",
      "y (8, 32, 32, 32, 1)\n",
      "\n",
      "y_new (9, 3, 32, 32, 32)\n",
      "y_new (8, 3, 32, 32, 32)\n",
      "y_new shape in multiclassy_new shape in multiclass (9, 3, 32, 32, 32)\n",
      " (8, 3, 32, 32, 32)\n",
      "reshaped y (8, 32, 32, 32, 3)\n",
      "reshaped y (9, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (9, 32, 32, 32, 4)\n",
      "yx (10, 32, 32, 32, 4)\n",
      "y  (9, 32, 32, 32, 1)\n",
      "(10, 32, 32, 32, 1)\n",
      "y_new y_new (10, 3, 32, 32, 32)\n",
      "(9, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (9, 3, 32, 32, 32)\n",
      "reshaped y (9, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (10, 3, 32, 32, 32)\n",
      "reshaped y (10, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (11, 32, 32, 32, 4)\n",
      "y (11, 32, 32, 32, 1)\n",
      "xy_new (11, 3, 32, 32, 32)\n",
      " (10, 32, 32, 32, 4)\n",
      "y (10, 32, 32, 32, 1)\n",
      "y_new (10, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (11, 3, 32, 32, 32)\n",
      "reshaped y (11, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (10, 3, 32, 32, 32)\n",
      "reshaped y (10, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (11, 32, 32, 32, 4)\n",
      "y (11, 32, 32, 32, 1)\n",
      "y_new (11, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (11, 3, 32, 32, 32)\n",
      "reshaped y (11, 32, 32, 32, 3)x (12, 32, 32, 32, 4)\n",
      "y (12, 32, 32, 32, 1)\n",
      "\n",
      "y_new (12, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (12, 3, 32, 32, 32)\n",
      "reshaped y (12, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (12, 32, 32, 32, 4)\n",
      "y (12, 32, 32, 32, 1)\n",
      "y_new (12, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (12, 3, 32, 32, 32)\n",
      "reshaped y (12, 32, 32, 32, 3)\n",
      "1/1 [==============================] - 8s 8s/step - loss: 0.9071 - acc: 0.3136 - val_loss: 0.7004 - val_acc: 0.4458\n",
      "Epoch 2/2\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (13, 32, 32, 32, 4)\n",
      "y (13, 32, 32, 32, 1)\n",
      "y_new (13, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (13, 3, 32, 32, 32)\n",
      "reshaped y (13, 32, 32, 32, 3)\n",
      "index 14\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (13, 32, 32, 32, 4)\n",
      "y (13, 32, 32, 32, 1)\n",
      "y_new (13, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (13, 3, 32, 32, 32)\n",
      "reshaped y (13, 32, 32, 32, 3)\n",
      "1/1 [==============================] - 11s 11s/step - loss: 0.6850 - acc: 0.4520 - val_loss: 0.6526 - val_acc: 0.3834\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7f1f696932e8>"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Run model\n",
    "\n",
    "model = unet_model_3d(input_shape=config[\"input_shape\"])\n",
    "\n",
    "model_file=config[\"model_file\"]\n",
    "model.fit_generator(generator=data_gen(data_file=config['data_file'],ids_file=config[\"training_file\"],labels=config[\"labels\"],batch_size=1),\n",
    "                        steps_per_epoch=1,\n",
    "                        epochs=2,\n",
    "                        validation_data=data_gen(data_file=config['data_file'],ids_file=config[\"validation_file\"],labels=config[\"labels\"],batch_size=1),\n",
    "                        validation_steps=1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index_list [3, 46, 14, 18, 0, 50, 26, 41, 39, 44, 56, 23, 29]\n",
      "index 0\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (1, 32, 32, 32, 4)\n",
      "y (1, 32, 32, 32, 1)\n",
      "y_new (1, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (1, 3, 32, 32, 32)\n",
      "reshaped y (1, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (2, 32, 32, 32, 4)\n",
      "y (2, 32, 32, 32, 1)\n",
      "y_new (2, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (2, 3, 32, 32, 32)\n",
      "reshaped y (2, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (3, 32, 32, 32, 4)\n",
      "y (3, 32, 32, 32, 1)\n",
      "y_new (3, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (3, 3, 32, 32, 32)\n",
      "reshaped y (3, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (4, 32, 32, 32, 4)\n",
      "y (4, 32, 32, 32, 1)\n",
      "y_new (4, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (4, 3, 32, 32, 32)\n",
      "reshaped y (4, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (5, 32, 32, 32, 4)\n",
      "y (5, 32, 32, 32, 1)\n",
      "y_new (5, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (5, 3, 32, 32, 32)\n",
      "reshaped y (5, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (6, 32, 32, 32, 4)\n",
      "y (6, 32, 32, 32, 1)\n",
      "y_new (6, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (6, 3, 32, 32, 32)\n",
      "reshaped y (6, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (7, 32, 32, 32, 4)\n",
      "y (7, 32, 32, 32, 1)\n",
      "y_new (7, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (7, 3, 32, 32, 32)\n",
      "reshaped y (7, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (8, 32, 32, 32, 4)\n",
      "y (8, 32, 32, 32, 1)\n",
      "y_new (8, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (8, 3, 32, 32, 32)\n",
      "reshaped y (8, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (9, 32, 32, 32, 4)\n",
      "y (9, 32, 32, 32, 1)\n",
      "y_new (9, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (9, 3, 32, 32, 32)\n",
      "reshaped y (9, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (10, 32, 32, 32, 4)\n",
      "y (10, 32, 32, 32, 1)\n",
      "y_new (10, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (10, 3, 32, 32, 32)\n",
      "reshaped y (10, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (11, 32, 32, 32, 4)\n",
      "y (11, 32, 32, 32, 1)\n",
      "y_new (11, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (11, 3, 32, 32, 32)\n",
      "reshaped y (11, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (12, 32, 32, 32, 4)\n",
      "y (12, 32, 32, 32, 1)\n",
      "y_new (12, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (12, 3, 32, 32, 32)\n",
      "reshaped y (12, 32, 32, 32, 3)\n"
     ]
    }
   ],
   "source": [
    "## Prediction\n",
    "\n",
    "prediction=model.predict_generator(generator=data_gen(data_file=config['data_file'],ids_file=config[\"validation_file\"],labels=config[\"labels\"]),steps=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "def multi_class_prediction(prediction, affine):\n",
    "    prediction_images = []\n",
    "    for i in range(prediction.shape[1]):\n",
    "        prediction_images.append(nib.Nifti1Image(prediction[0, i], affine))\n",
    "    return prediction_images"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Original\n",
    "def get_prediction_labels(prediction, threshold=0.5, labels=None):\n",
    "    n_samples = prediction.shape[0]\n",
    "    label_arrays = []\n",
    "    for sample_number in range(n_samples):\n",
    "        label_data = np.argmax(prediction[sample_number], axis=-1) + 1\n",
    "        label_data[np.max(prediction[sample_number], axis=-1) < threshold] = 0\n",
    "        if labels:\n",
    "            for value in np.unique(label_data).tolist()[1:]:\n",
    "                label_data[label_data == value] = labels[value - 1]\n",
    "                label_data == value #= labels[value ]#- 1]\n",
    "        label_arrays.append(np.array(label_data, dtype=np.uint8))\n",
    "    return label_arrays\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "def prediction_to_image(prediction, affine, label_map=False, threshold=0.5, labels=None):\n",
    "    if prediction.shape[1] == 1:\n",
    "        data = prediction[0, 0]\n",
    "        if label_map:\n",
    "            label_map_data = np.zeros(prediction[0, 0].shape, np.int8)\n",
    "            if labels:\n",
    "                label = labels[0]\n",
    "            else:\n",
    "                label = 1\n",
    "            label_map_data[data > threshold] = label\n",
    "            data = label_map_data\n",
    "    elif prediction.shape[1] > 1:\n",
    "        if label_map:\n",
    "            label_map_data = get_prediction_labels(prediction, threshold=threshold, labels=labels)\n",
    "            data = label_map_data[0]\n",
    "        else:\n",
    "            return multi_class_prediction(prediction, affine)\n",
    "    else:\n",
    "        raise RuntimeError(\"Invalid prediction array shape: {0}\".format(prediction.shape))\n",
    "    return nib.Nifti1Image(data, affine)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/home/vjain/notebooks/Volumetric_Segmentation/model/tumor_model.h5\n"
     ]
    }
   ],
   "source": [
    "config[\"model_file\"] = os.path.abspath('model/tumor_model.h5')\n",
    "print(config[\"model_file\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "validation_list [3, 46, 14, 18, 0, 50, 26, 41, 39, 44, 56, 23, 29]\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 3\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_3\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.15625     0.          0.       -183.421875]\n",
      " [   0.          5.0625      0.         32.03125 ]\n",
      " [   0.          0.          4.375       1.6875  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.15625 5.0625  4.375   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.42188\n",
      "qoffset_y       : 32.03125\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.15625    0.         0.      -183.42188]\n",
      "srow_y          : [ 0.       5.0625   0.      32.03125]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 46\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_46\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.25        0.          0.       -185.375   ]\n",
      " [   0.          5.90625     0.         23.453125]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.25    5.90625 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.375\n",
      "qoffset_y       : 23.453125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.25     0.       0.    -185.375]\n",
      "srow_y          : [ 0.        5.90625   0.       23.453125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 14\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_14\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.46875     0.          0.       -187.265625]\n",
      " [   0.          5.8125      0.         21.40625 ]\n",
      " [   0.          0.          4.5         1.75    ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.46875 5.8125  4.5     1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.26562\n",
      "qoffset_y       : 21.40625\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.46875    0.         0.      -187.26562]\n",
      "srow_y          : [ 0.       5.8125   0.      21.40625]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 18\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_18\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.0625      0.          0.       -182.46875 ]\n",
      " [   0.          5.125       0.         26.0625  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.0625  5.125   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.46875\n",
      "qoffset_y       : 26.0625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.0625     0.         0.      -182.46875]\n",
      "srow_y          : [ 0.      5.125   0.     26.0625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 0\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_0\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -182.453125]\n",
      " [   0.          5.15625     0.         31.078125]\n",
      " [   0.          0.          4.28125     8.640625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 5.15625 4.28125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.45312\n",
      "qoffset_y       : 31.078125\n",
      "qoffset_z       : 8.640625\n",
      "srow_x          : [   4.09375    0.         0.      -182.45312]\n",
      "srow_y          : [ 0.        5.15625   0.       31.078125]\n",
      "srow_z          : [0.       0.       4.28125  8.640625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 50\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_50\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375     0.         0.      -187.28125]\n",
      " [   0.         5.6875     0.        23.34375]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.4375 5.6875 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.28125\n",
      "qoffset_y       : 23.34375\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.4375     0.         0.      -187.28125]\n",
      "srow_y          : [ 0.       5.6875   0.      23.34375]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 26\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_26\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.28125     0.          0.       -185.359375]\n",
      " [   0.          5.75        0.         23.375   ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.28125 5.75    4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -185.35938\n",
      "qoffset_y       : 23.375\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.28125    0.         0.      -185.35938]\n",
      "srow_y          : [ 0.     5.75   0.    23.375]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 41\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_41\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625      0.          0.       -189.21875 ]\n",
      " [   0.          4.90625     0.         28.953125]\n",
      " [   0.          0.          4.34375     5.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.5625  4.90625 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -189.21875\n",
      "qoffset_y       : 28.953125\n",
      "qoffset_z       : 5.671875\n",
      "srow_x          : [   4.5625     0.         0.      -189.21875]\n",
      "srow_y          : [ 0.        4.90625   0.       28.953125]\n",
      "srow_z          : [0.       0.       4.34375  5.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 39\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_39\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.3125      0.         28.15625 ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.3125  4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 28.15625\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.       5.3125   0.      28.15625]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 44\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_44\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.8125      0.          0.       -193.09375 ]\n",
      " [   0.          5.0625      0.         34.03125 ]\n",
      " [   0.          0.          4.46875     1.734375]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.8125  5.0625  4.46875 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -193.09375\n",
      "qoffset_y       : 34.03125\n",
      "qoffset_z       : 1.734375\n",
      "srow_x          : [   4.8125     0.         0.      -193.09375]\n",
      "srow_y          : [ 0.       5.0625   0.      34.03125]\n",
      "srow_z          : [0.       0.       4.46875  1.734375]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 29\n",
      "/data/home/vjain/notebooks/Volumetric_Segmentation/prediction/validation_case_29\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.53125     0.          0.       -187.234375]\n",
      " [   0.          5.21875     0.         29.109375]\n",
      " [   0.          0.          4.4375      1.71875 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.53125 5.21875 4.4375  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.23438\n",
      "qoffset_y       : 29.109375\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.53125    0.         0.      -187.23438]\n",
      "srow_y          : [ 0.        5.21875   0.       29.109375]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    }
   ],
   "source": [
    "## Make predictions - create prediction folder\n",
    "\n",
    "from keras.models import load_model\n",
    "from keras.utils.io_utils import H5Dict\n",
    "import nibabel as nib\n",
    "import image_slicer\n",
    "\n",
    "#prediction_dir = os.path.join('/home/vjain/notebooks/3DUnetCNN/brats/',\"prediction\")\n",
    "prediction_dir = os.path.abspath('prediction')\n",
    "\n",
    "os.makedirs(prediction_dir)\n",
    "output_dir=prediction_dir\n",
    "\n",
    "config[\"model_file\"] = os.path.abspath('model/tumor_model.h5')\n",
    "\n",
    "\n",
    "#with (open(\"/home/vjain/notebooks/3DUnetCNN/brats/validation_ids.pkl\", \"rb\")) as validation_keys_file,open('/home/vjain/notebooks/3DUnetCNN/brats/brats_data.h5','rb') as brats_file, open('/home/vjain/notebooks/3DUnetCNN/brats/tumor_model.h5','rb') as model_file:\n",
    "with (open( config[\"validation_file\"],'rb')) as validation_keys_file, open(config[\"data_file\"],'rb') as brats_file, open(config[\"model_file\"],'rb') as model_file:\n",
    "    f = h5py.File(model_file, 'r')\n",
    "    model = load_model(f, custom_objects = None, compile=True)\n",
    "    validation_file=pickle.load(validation_keys_file)\n",
    "    orig_index_list = validation_file\n",
    "    x_list = list()\n",
    "    y_list = list()\n",
    "    validation_indices= list(copy.copy(orig_index_list))\n",
    "    print('validation_list',validation_indices)\n",
    "    \n",
    "    while len(validation_file) > 0:\n",
    "        index = validation_file.pop()\n",
    "        for index in validation_indices:\n",
    "            print('index',index)\n",
    "            case_directory = os.path.join(output_dir, \"validation_case_{}\".format(index))\n",
    "            print(case_directory)\n",
    "            # Test case for validation data\n",
    "            if not os.path.exists(case_directory):\n",
    "                os.makedirs(case_directory)\n",
    "            # Orientation of validation data\n",
    "            affine_file = HDF5Matrix(brats_file, 'affine',0,None)   \n",
    "            affine = affine_file[index]\n",
    "            # Datafile for deriving test data\n",
    "            data_file = HDF5Matrix(brats_file, 'data',0,None)   \n",
    "            test_data = np.asarray([data_file[index]])\n",
    "            print('test_data shape',test_data.shape)\n",
    "            # Modalities\n",
    "            training_modalities=config['training_modalities']\n",
    "            for i, modality in enumerate(training_modalities):\n",
    "                image = nib.Nifti1Image(test_data[0, i], affine)\n",
    "                image.to_filename(os.path.join(case_directory, \"data_{0}.nii.gz\".format(modality)))\n",
    "            # Segmentation map\n",
    "            truth_file = HDF5Matrix(brats_file, 'truth',0,None)\n",
    "            test_truth = nib.Nifti1Image(truth_file[index][0], affine)\n",
    "            test_truth.to_filename(os.path.join(case_directory, \"truth.nii.gz\"))\n",
    "            #test_data=np.reshape(test_data,(test_data.shape[2],test_data.shape[3],test_data.shape[4],test_data.shape[1],test_data.shape[0]))\n",
    "            labels=config[\"labels\"]\n",
    "            print('labels',labels)\n",
    "            # Prediction image for each validation case\n",
    "            prediction_image = prediction_to_image(prediction, affine, label_map=True, threshold=0.1,\n",
    "                                           labels=labels)\n",
    "            print('prediction_image',prediction_image)\n",
    "            prediction_image.to_filename(os.path.join(case_directory, \"prediction.nii.gz\"))\n",
    "            \n",
    "            #sliced=image_slicer.slice(prediction_image, 6)\n",
    "            #for image in sliced:\n",
    "            #    image.to_filename(os.path.join(case_directory, \"prediction.nii.gz\"))\n",
    "            \n",
    "            #for image in prediction_image:\n",
    "            #    image.to_filename(os.path.join(case_directory, \"prediction.nii.gz\"))\n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<nilearn.plotting.displays.OrthoSlicer at 0x7f1f6812ed30>"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj0AAADeCAYAAADW3rEEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XtwVPX9//HX3rK7yeYCBAi3ipQRLdVJjUpV1Mi05dLaYdQioEAQQatFUsYpOuN8lfGnop1aKBRBrIqoiLaKgpK2lEmH4rRqS7TW0lZtpgRByI1kc9ns7fdHOIeNZBOSbHY3Oc/HzBnI7tmzn90N4Z335/3+fGzRaDQqAACAQc6e6gEAAAAkA0EPAACwBIIeAABgCQQ9AADAEgh6AACAJRD0AAAASyDoAQAAlkDQAwAALIGgBwAAWAJBDwAAsARnqgcAAAPCIlvX929lRx8g3ZHpAQAAlkDQAwAALIHpLQCIp7spLQADCpkeAABgCQQ9AADAEmzRaJSWAwAw9NeUFt1dsJhwOKxLLrlEY8aM0e7du1M9HElkegAAQD9Yt26dLrjgglQPowOCHgDoodL32g8AnauqqtJbb72l2267LdVD6YDuLQD4snVHpbyCzu+rP6aK80cldzzAAFNaWqrHH39cjY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4AAGAJBD0AAMASCHoAAIAlEPQAAABLIOgBAACWQNADAAAsgaAHAABYAkEPAACwBIIeAABgCQQ9AADAEgh6AACAJRD0AAAASyDoAQAAlkDQAwAALIGgBwAAWAJBDwAAsIT/DxEdIS4pJdjEAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 525.6x187.2 with 5 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "## Prediction visualisation\n",
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "#org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_18/truth.nii.gz')\n",
    "org = nibabel.load(os.path.abspath('prediction/validation_case_14/truth.nii.gz'))\n",
    "\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<nilearn.plotting.displays.OrthoSlicer at 0x7f1f67aed048>"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj0AAADeCAYAAADW3rEEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAG6VJREFUeJzt3X1wVFf9x/FPCBUCCwQIkABtIsVpUhAy5SFVgSwdGCJaicLQQgqJPLS1iGSYqqjDlAg/QFCkHWzryKBtsbRVRyi0CY7axQ6OtRZSpJ34q2Iq9IE2JflBOg2EJL8/YlLysNm7N+fuvbv3/ZrZadm9D9+79wa+Oed7zklqaWlpEQAA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Ph3/SQiFQvrPf/6jlpYWnT17Vhs2bNCCBQtic+GIW3379tWePXs0b9485eTkaPHixZowYYLbYUmipQcAPO3QoUOqra3VjBkz2t+bOXOmysvLLe3/pz/9SbNnz27/c0pKivLz8xUKhfTnP/9ZR44cUUpKilJTU9u3KS8v18yZM3XixAkVFRWptrZWw4cPV2FhYY+tS0Cb+fPna/78+W6H0UVSS9RtlQAAhGFltW87E+nFcsJAN7vSTK0M7/EuMLfQvQUAAHyBpAcAAPgC3VsAAMAXaOkBAAC+QNIDAAB8gaQHAAD4AkkPAADwBZIeAADgCyQ9AADAF0h6AACAL5D0AAAAXyDpAQAAvkDSAwAAfIGkBwAA+AJJDwAA8AWSHgAA4AskPQAAwBdIegAAgC+Q9AAAAF8g6QEAAL5A0gMAAHyBpAcAAPgCSQ8AAPAFkh4AAOALJD0AAMAXSHoAAIAvkPQAAABf+H+7JgwjsWhcQAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 525.6x187.2 with 5 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "#org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_18/prediction.nii.gz')\n",
    "org = nibabel.load(os.path.abspath('prediction/validation_case_14/prediction.nii.gz'))\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11/prediction.nii.gz')\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<nilearn.plotting.displays.OrthoSlicer at 0x7f1f67971358>"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj0AAADeCAYAAADW3rEEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAHHxJREFUeJzt3XtwlNX9x/HP3vfJbi5ADAFRU2UGEcVUqkwZL/FXFbXKWKXekSiCeKGmjjM6UzuFOora1kJlEFHrBS1qL6NiSzplnLTWjm1tSafUYcZ2TDUKwiaE7G72vvv7I32OiUSuSZ4kz/s1s4PJ7j75bnaEz57zPed4SqVSSQAAAGOc1+kCAAAAhgOhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAADLpCoaAvf/nLuuSSS5wuxSD0AACAQbd69WpNnz7d6TL6IfQAwAjT1NSkpqYmp8sADlt7e7t+/etf6+abb3a6lH78ThcAAOivtbXV6RKAI9LU1KRHHnlE8Xj8gI+98MILFYvF9vuY6upqNTc3H3FdhB4AADBo3njjDdXU1GjWrFlqaWk54ONjsZjefffd/T7mK1/5yqDUxvQWAByiuro6bdmyxekyMMjq6upkWZai0ahqa2vV2NioRCLhdFmjzttvv63XX39ddXV1uvrqq/Xmm2/q+uuv388zSpLSB7gNDkZ6AAD4n02bNum8887Tzp07NXfuXK1cuVIPPPCA02WNKitXrtTKlSslSS0tLfrhD3+oF1544Qsf/8knO7RixcPDUhsjPQA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AAV2CkBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuAKhBwAAuML/Aw2m7MjG7v/mAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 525.6x187.2 with 5 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/v_1_50/prediction/validation_case_11/prediction.nii.gz')\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python (unet)",
   "language": "python",
   "name": "unet"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
